<html><head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
<meta name="wap-font-scale" content="no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<title>新芽阅读个人中心</title>
<link rel="shortcut icon" href="javascript:void(0)http://img2.2345.com/bookimg/public/pic/book/book_icon.png">
<link rel="stylesheet" href="/static/css/mobile-global.css">
<link rel="stylesheet" href="/static/css/change.css">
	<link rel="stylesheet" href="/static/css/mobile-user.css">
	<link href="javascript:void(0)http://img1.2345.com/bookimg/public/pic/book/icon-57.jpg" rel="apple-touch-icon">
<link href="javascript:void(0)http://img2.2345.com/bookimg/public/pic/book/icon-114.jpg" sizes="114x114" rel="apple-touch-icon">
<link href="javascript:void(0)http://img3.2345.com/bookimg/public/pic/book/icon-57.jpg" rel="apple-touch-icon-precomposed">
    {css href="/static/css/toastr.min.css"}
    <style>
	.saveinfo{display:block;width:100px;height:40px;margin:0 auto;background-color:#FF9F51;border-radius:5px;border:none;color:#333;margin-left:93px;margin-top:25px;}
	#sex{border-radius: 10px;border: 1px solid #999;width: 275px;display:block;height:50px;}
	#myinfo{margin:0 auto;}
</style>
</head>
<body id="xtopjsinfo" ontouchstart="">
<!--wrapper begin-->
<div class="wrapper userCenter">
<!-- header begin -->
<header class="header inner-header">
<h1 class="sub-title">用户中心</h1>
<a href="{:url('mobile/index/index')}" class="home iconfont icon-home" onclick="cc('ck_m_fanhuishouye')"></a></header>
<!--header end--><div class="container">
<!-- user -->
<div class="uc-info">
	<div class="avatar"><img src="{$data.icon}" width="60px" height="60px"></div>
	<p class="name">{$data.name}</p>
	<p class="balance">账号：<b class="spec">{$data.tel}</b></p>
<a class="btn-primary" btn-size="small" href="{:url('mobile/Personal/icon',['id'=>$Request.session.user.id])}">更换头像</a></div>
<ul class="uc-op-list">
		<li><a href="{:url('mobile/Personal/index')}">返回上一级</a></li>
</ul>
<form method="post" id="myinfo">
	<input type="hidden" name="id" value="{$data.id}">
	<span>昵称</span>
	<input type="text" name="name" value="{$data.name}" style="border-radius:10px;border:1px solid #999;width:275px" autocomplete="off">
	<span>手机</span>
	<input type="text" name="tel" value="{$data.tel}" style="border-radius:10px;border:1px solid #999;width:275px" maxlength="11" autocomplete="off">
	<span style="display:block;">性别</span>
	<select name="sex" id="sex">
        <option value="0" {$data.sex==0?'selected':''}>女</option>
        <option value="1" {$data.sex==1?'selected':''}>男</option>
    </select>
</form>
<button class="saveinfo">保存修改</button>

<ul class="uc-op-list" style="margin-top:20px;">
		<li><a href="{:url('mobile/Personal/logout')}">退出登录</a></li>
</ul>
</div>
</div>
<!--wrapper end-->
<!--footer begin-->
<!--footer begin-->
<footer class="footer">
<p class="links"><a href="{:url('mobile/index/index')}">小说首页</a><i>|</i><a href="javascript:void(0)/app/index.html">手机客户端</a><i>|</i><a href="javascript:void(0)/m/index.php/c/feedback/">问题反馈</a><i>|</i><a href="javascript:void(0)#xtopjsinfo" class="go_top">返回顶部</a></p>
</footer>
<!--footer end-->
{js href="/static/layout/js/jquery-1.10.2.min.js" }
{js href="/static/layout/js/jquery-ui-1.9.2.custom.min.js" }
{js href="/static/layout/js/jquery-migrate-1.2.1.min.js" }
{js href="/static/layout/js/bootstrap.min.js" }
{js href="/static/layout/js/modernizr.min.js" }
{js href="/static/layout/js/jquery.nicescroll.js" }
{js href="/static/js/toastr.min.js"}
<script>
     
     $(function(){
      // 设置弹框参数
        toastr.options = {
            closeButton: true,// 是否显示关闭按钮
            progressBar: true,// 实现显示计时条
            timeOut: "3000",  // 自动关闭时间
            positionClass: "toast-top-right" // 提示位置
            // toast-top-full-width 顶端，宽度铺满整个屏幕
            // toast-top-right  顶端右边
        };

        $('.saveinfo').click(function () {
            var data = $('#myinfo').serialize();
            $('#myinfo').submit(changemyinfo(data));
        });

    });

	function changemyinfo(data) {
            $.ajax({
                data:data,
                type: 'post',
                url: '/myinfo/',
                dataType:'json',
                success: function (data) {
                    if (data.status) {
                        toastr.success(data.info);
                    } else {
                        toastr.error(data.info, 'FBI WARING:');
                    }
                },
                error: function () {
                    toastr.error(data.info, 'FBI WARING:');;
                }
            });
        }

</script>
</body></html>
